class AddDbVersionOne < ActiveRecord::Migration
  def self.up
    
    create_table "photoalbums", :force => true do |t|
      t.column "name",        :string,  :limit => 100, :default => "",    :null => false
      t.column "description", :text,                   :default => "",    :null => false
      t.column "default",     :boolean,                :default => false, :null => false
      t.column "created_at",  :timestamp, :null => false
    end
    
    create_table "comments", :force => true do |t|
      t.column "user_name",     :string,  :limit => 100, :default => "", :null => false
      t.column "body",          :text
      t.column "created_at",  :timestamp, :null => false
      t.column "photoalbum_id", :integer
    end
  
    create_table "reactions", :force => true do |t|
        t.column "user_name",     :string,  :limit => 100, :default => "", :null => false
        t.column "email_address", :string,  :limit => 255, :default => "", :null => false
        t.column "body",          :text, :null => false
        t.column "created_at",  :timestamp, :null => false
      end
  
    create_table "users", :force => true do |t|
      t.column "name",     :string, :limit => 255, :default => "", :null => false
      t.column "email",    :string, :limit => 255, :default => "", :null => false
      t.column "password", :string, :limit => 255, :default => "", :null => false
      t.column "created_at",  :timestamp, :null => false
    end
  
    create_table "welcomemessages", :force => true do |t|
      t.column "title",      :string,   :limit => 100, :default => "", :null => false
      t.column "body",       :text,                    :default => "", :null => false
      t.column "created_at", :datetime,                                :null => false
    end
    
  end

  def self.down
    drop_table :welcomemessage
    drop_table :users
    drop_table :reactions
    drop_table :photoalbums
    drop_table :comments
  end
end
